package org.backend.service;

import org.backend.pojo.entity.Favor;
import org.backend.pojo.entity.Product;
import org.backend.pojo.vo.FavorWithProductVO;
import org.backend.pojo.vo.ProductCategoriesVO;
import org.backend.utils.ApiResponse;
import org.springframework.http.ResponseEntity;

import java.util.List;

public interface ProductService {
    ApiResponse<?> findAll(String userId, String openid, String type);

    ResponseEntity<String> publish(Product product);

    ResponseEntity<String> delete(Product product);

    ResponseEntity<String> revise(Product product);

    ApiResponse<List<Product>> getAllProList();

    ApiResponse<List<Product>> getPopularProducts();

    ApiResponse<Product> getProductById(Integer productId);

    ApiResponse<List<ProductCategoriesVO>> getProductCategories();

    ApiResponse<List<ProductCategoriesVO>> getRandomCategories();

    ApiResponse<Boolean> getFavor(Favor favor);

    ApiResponse<String> editFavor(Favor favor);

    ApiResponse<List<FavorWithProductVO>> getAllFavor(Favor favor);
}
